﻿using System;
using System.Reflection;
using NUnit.Framework;
using Wombat.Common;

namespace Common.UnitTests
{
    [TestFixture]
    public class ObjectExtensionsUnitTests
    {
        [Test]
        public void NullSafeOperator()
        {
            var bug = default(Assembly);
            Assert.Throws<ArgumentNullException>(() => bug.GetCustomAttributes());
            Assert.DoesNotThrow(() => bug.NullSafe(b => b.GetCustomAttributes()));
        }
    }
}
